<template>
<div class="page">
  <div class='nav'>
    <div class="input_view flex_ac" @click="$back() ">
      <van-icon class="ml6" name="arrow-left" size="26" color="#000"/>
      <div class="nav_title">提示</div>
    </div>
	</div>
  <div class="h40"></div>
	<div class="image flex_ac flex_center">
		<van-icon name="success" color="#fff" size="40" />
	</div>
	<div class="text1">{{name}}</div>
	<div class="text2">{{desc}}<span style="color: #FA8A26;">{{ desc1 }}</span>{{desc2}}</div>
	<div class="btn" @click="toBack">
		返回 ({{num}}s)
	</div>
</div>
</template>

<script>
export default{
	data(){
		return{
			num:3,
			name:'认证成功',
			desc:'您好，您的资料已经认证成功',
			desc1:'',
			desc2:'',
		}
	},
  created() {
    this.num = 3
    let type = this.$route.query.type
		if (type == 'rz') {
			this.name = '认证成功'
			this.desc = '您好，您的资料已经认证成功'
		} else if (type == 'tj') {
			this.name = '提交成功'
			this.desc = '您好，客服工作人员会在3个工作日联系您'
		} else if (type == 'xgmm') {
			this.name = '修改成功'
			this.desc = '您好，您的密码已经修改成功'
		} else if (type == 'xgsj') {
			this.name = '修改成功'
			this.desc = '您好，您的手机号已经修改成功'
		} else if (type == 'dingzhi') {
			this.name = '提交成功'
			this.desc = '您好，工作人员会在1-3个工作日联系您'
		} else if (type == 'fb') {
			this.name = '发布成功'
			this.desc = '您好，发布成功，可以在'
			this.desc1 = '个人中心-我的发布'
			this.desc2 = '查看'
		} else if (type == 'report') { 
			this.name = '尽调完成'
			this.desc = '您好，尽调完成，30分钟后可以在'
			this.desc1 = '个人中心-我的尽调'
			this.desc2 = '查看'
		} else if (type == 'huiyi') { 
			this.name = '提交成功'
			this.desc = '您好，您的报名已经提交完成'
		}

		let time = setInterval(()=>{
			if(this.num>0){
				this.num = this.num-1
			}else{
				clearInterval(time)
				this.toBack()
			}
		},1000)
	},
	methods:{
    toBack() {
      this.$router.back()
		}
	}
}
</script>

<style scoped lang="scss">
.nav{
	width: 100%;
	position: fixed;
	top: 0;
	left: 0;
  height: 40px;
	background-color: rgba($color: #fff, $alpha: 1);
	z-index: 10;
	transition: all 0.5s;
}
.input_view{
	width: 100%;
  height: 100%;
	.nav_title{
		font-weight: 500;
		font-size: 18px;
		color: #000;
	}
}

.page{
	width:100%;
	height:100%;
	background:#fff;
	.image{
		height:55px;
		width:55px;
    border-radius: 50%;
		margin:50px auto 10px;
    background: #52C41A;
	}
	.text1{
		text-align: center;
		font-weight: 600;
		font-size: 18px;
		color: #000000;
	}
	.text2{
		text-align: center;
		margin-top:8px;
		margin-bottom:35px;
		font-weight: 400;
		font-size: 12px;
		color: #666666;
	}
	.btn{
		width:110px;
		height: 33px;
		line-height:33px;
		text-align: center;
		font-size: 14px;
		color: #138AF2;
		background: #FFFFFF;
		border-radius: 3px;
		border: 1px solid #138AF2;
		margin:0 auto
	}
}
</style>